'use strict';
exports.main = async (event, context) => {
	const { openid } = event
	const db = uniCloud.database();
	const user = db.collection('user')
	
	const _user = await user.where({ openid }).field({
		avatarUrl: true,
		nickName: true,
		gender: true,
		mobile: true,
	}).get()
	
	if(_user.data.length === 0){
		return { msg: '无此用户' }
	}else{
		return _user
	}
}
